﻿Option Explicit On
Option Strict On

''' <summary>
''' Clase cita: Para almacenar los datos de una cita de la BBDD
''' </summary>
''' <author>Julio Antoranz</author>

Public Class Cita

    Private _codigo As Integer
    Private _codigo_cliente As Integer
    Private _codigo_empleado As Integer
    Private _fecha As DateTime
    Private _recordatorio As String

    'Vacio
    Public Sub New()
        _codigo = 0
        _codigo_cliente = 0
        _codigo_empleado = 0
        _recordatorio = ""
        _fecha = DateTime.FromOADate(1 / 1 / 2000)
    End Sub

    ' Contructor con parametros
    Public Sub New(ByVal codigo As Integer, ByVal codigocliente As Integer, ByVal codigoempleado As Integer, ByVal fecha As DateTime)

        _codigo = codigo
        _codigo_cliente = codigocliente
        _codigo_empleado = codigoempleado
        _fecha = fecha

    End Sub

    Public Property Codigo As Integer

        Get
            Return _codigo
        End Get
        Set(ByVal value As Integer)
            _codigo = value
        End Set
    End Property

    Public Property CodigoCliente As Integer

        Get
            Return _codigo_cliente
        End Get
        Set(ByVal value As Integer)
            _codigo_cliente = value
        End Set
    End Property

    Public Property CodigoUsuario As Integer

        Get
            Return _codigo_empleado
        End Get
        Set(ByVal value As Integer)
            _codigo_empleado = value
        End Set
    End Property


    Public Property Fecha As DateTime

        Get
            Return _fecha
        End Get
        Set(ByVal value As DateTime)
            _fecha = value
        End Set
    End Property


    Public Property Recordatorio As String
        Get
            Return _recordatorio
        End Get
        Set(ByVal value As String)
            _recordatorio = value
        End Set
    End Property

    'Desctructores
    Public Sub Dispose()

        _codigo = -1
        _codigo_cliente = -1
        _codigo_empleado = -1
        _fecha = Date.FromOADate(1 / 1 / 1001)

    End Sub

    Protected Overrides Sub Finalize()

        _codigo = -1
        _codigo_cliente = -1
        _codigo_empleado = -1
        _fecha = Date.FromOADate(1 / 1 / 1001)

    End Sub



End Class
